package com.rapplogic.xbee.examples.zigbee;
import fr.dgac.ivy.*;
public class RobotMsgNotifier{
	Ivy bus;

	RobotMsgNotifier(String adresse){		
		bus=new Ivy("RobotMsgNotifier","",null);
		try{	bus.start(adresse);	}
		catch(IvyException e){	
			System.out.println("Erreur "+e);
		}
	}

	void forwardDataFromSap(String dataFromSap){
		try {
			bus.sendMsg(dataFromSap);
		}
		catch (IvyException ie) {	System.out.println("can't send my message on the bus");	}	
	}

/*	public static void main(String[] arg) throws InterruptedException{
		RobotMsgNotifier rn = new RobotMsgNotifier("127.255.255.255:2010");
		for(int i=0;i<100;i++){
			Thread.sleep(1500);
			rn.forwardDataFromSap("Hi");
			System.out.println("S envoyé");
		}
	}*/
}